import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/login',
    method: 'post',
    data: data
  })
}

export function getInfo(token) {
  return request({
    url: '/sys/info',
    method: 'get',
    params: { token }
  })
}

// 退出方法
export function logout() {
  return request({
    url: '/auth/logout',
    method: 'delete'
  })
}

// 获取路由
export const getRouters = () => {
  return request({
    url: '/sys/getRouters',
    method: 'get'
  })
}

// 获取图片
export function captchaImage() {
  return request({
    url: '/code',
    method: 'get'
  })
}
